package com.ymatou.iapi.godfreightmgr.testcase;

import org.junit.After;
import org.junit.AfterClass;
import org.junit.Before;
import org.junit.BeforeClass;
import org.junit.Test;
import org.junit.experimental.categories.Category;

import com.ymatou.iapi.godfreightmgr.parameter.CreateCollectionGoodsAddressBean;
import com.ymatou.iapi.godfreightmgr.parameter.EditCollectionGoodsAddressBean;
import com.ymatou.iapi.godfreightmgr.service.EditCollectionGoodsAddressCall;
import com.ymt.core.tool.Logger;
import com.ymt.utils.annotation.*;
import com.ymt.utils.tag.*;
import com.ymttest.business.service.GodfreightmgrService;
import com.ymttest.business.service.shenqi.GodmchManageCallService;
import com.ymttest.database.model.godfreight.CollectiongoodsAddress;
import com.ymttest.utils.TestDataManager;
/**
*修改自提点
*FreeMaker Template自动生成代码
*/
@TestSuite
public class Ts_EditCollectionGoodsAddress{
	private static EditCollectionGoodsAddressBean editcollectiongoodsaddressBean;
	private static EditCollectionGoodsAddressCall editcollectiongoodsaddressCall;
	com.ymttest.database.sqlwapper.godfreight.CollectionGoodsWapper CollectionGoodsWapper;
	@BeforeClass
	public static void setUp() {
		Logger.createResultFile("修改自提点");
	}

	@Before
	public void caseUp() {
		editcollectiongoodsaddressBean=new EditCollectionGoodsAddressBean();
		editcollectiongoodsaddressCall=new EditCollectionGoodsAddressCall();
		CollectionGoodsWapper=new com.ymttest.database.sqlwapper.godfreight.CollectionGoodsWapper();
	}

	@AfterClass
	public static void tearDown() {
		Logger.generateResult(editcollectiongoodsaddressCall.getOpurl());
	}

	@After
	public void caseDown() {
		Logger.end();
	}
	private void verify(int addressid, EditCollectionGoodsAddressBean editcollectiongoodsaddressBean2) {
		CollectiongoodsAddress ca = CollectionGoodsWapper.selectCollectiongoodsAddress(addressid, editcollectiongoodsaddressBean2.getSellerId()).get(0);
		if(editcollectiongoodsaddressBean2.getAddressName()!=null) {
				Logger.verifyEquals(editcollectiongoodsaddressBean2.getAddressName(), ca.getAddressName(), "验证AddressName");
		}else {
			Logger.verifyNotNull( ca.getAddressName(), "验证AddressName");
		}
		if(editcollectiongoodsaddressBean2.getSellerId()!=null) {
			Logger.verifyEquals(editcollectiongoodsaddressBean2.getSellerId(), ca.getSellerId(), "验证SellerId");
		}else {
			Logger.verifyNotNull( ca.getSellerId(), "验证SellerId");
		}
		if(editcollectiongoodsaddressBean2.getAddressPic()!=null) {
			Logger.verifyEquals(editcollectiongoodsaddressBean2.getAddressPic(), ca.getAddressPic(), "验证AddressPic");
		}else {
			Logger.verifyNotNull( ca.getAddressPic(), "验证AddressPic");
		}
		if(editcollectiongoodsaddressBean2.getAddressType()!=null) {
			Logger.verifyEquals(editcollectiongoodsaddressBean2.getAddressType(), ca.getAddressType(), "验证AddressType");
		}else {
			Logger.verifyNotNull( ca.getAddressType(), "验证AddressType");
		}
		if(editcollectiongoodsaddressBean2.getAreaCode()!=null) {
			Logger.verifyEquals(editcollectiongoodsaddressBean2.getAreaCode(), ca.getAreaCode(), "验证AreaCode");
		}else {
			Logger.verifyNotNull( ca.getAreaCode(), "验证AreaCode");
		}
		if(editcollectiongoodsaddressBean2.getBaseAddress()!=null) {
			Logger.verifyEquals(editcollectiongoodsaddressBean2.getBaseAddress(), ca.getBaseAddress(), "验证BaseAddress");
		}else {
			Logger.verifyNotNull( ca.getBaseAddress(), "验证BaseAddress");
		}
		Logger.verifyNotNull( ca.getCreateTime(), "验证CreateTime");
		Logger.verifyEquals(false, ca.getDeleted(), "验证Deleted");
		if(editcollectiongoodsaddressBean2.getDetailAddress()!=null) {
			Logger.verifyEquals(editcollectiongoodsaddressBean2.getDetailAddress(), ca.getDetailAddress(), "验证DetailAddress");
		}else {
			Logger.verifyNotNull( ca.getDetailAddress(), "验证DetailAddress");
		}
		if(editcollectiongoodsaddressBean2.getMobile()!=null) {
			Logger.verifyEquals(editcollectiongoodsaddressBean2.getMobile(), ca.getMobile(), "验证Mobile");
		}else {
			Logger.verifyNotNull( ca.getMobile(), "验证Mobile");
		}
		Logger.verifyNotNull( ca.getUpdateTime(), "验证CreateTime");
	}
	@Test
	@Category({P1.class})
	@TestCase
	public void Tc_EditCollectionGoodsAddress_001() {
		Logger.start(true,"修改自提点成功");
		try {
			Integer mchId_channl = GodmchManageCallService.CreateSellerMch();
			CreateCollectionGoodsAddressBean createcollectiongoodsaddressBean = GodfreightmgrService.initCreateCollectionGoodsAddressBean(mchId_channl);
			int addressId = GodfreightmgrService.createcollectiongoodsaddressCall(createcollectiongoodsaddressBean);
			
			editcollectiongoodsaddressBean.setAddressId(addressId);
			editcollectiongoodsaddressBean.setAddressName("editname");
			editcollectiongoodsaddressBean.setSellerId(mchId_channl);
			editcollectiongoodsaddressBean.setAddressPic("http://www.yamtou.com");
			editcollectiongoodsaddressBean.setAddressType(2);
			editcollectiongoodsaddressBean.setAreaCode("86");
			editcollectiongoodsaddressBean.setBaseAddress("baseAddress");
			editcollectiongoodsaddressBean.setDetailAddress("detailAddress");
			editcollectiongoodsaddressBean.setMobile(TestDataManager.getPhoneNum());
			editcollectiongoodsaddressCall.setData(editcollectiongoodsaddressBean);
			editcollectiongoodsaddressCall.callService();			
			Logger.verifyEquals("200", editcollectiongoodsaddressCall.getString("code"), "验证code");
			verify(addressId,editcollectiongoodsaddressBean);
		} catch (Exception e) {
			Logger.fail(e);
		}
	}
	@Test
	@Category({P2.class})
	@TestCase
	public void Tc_EditCollectionGoodsAddress_002() {
		Logger.start(true,"不输入sellerid失败");
		try {
			Integer mchId_channl = GodmchManageCallService.CreateSellerMch();
			CreateCollectionGoodsAddressBean createcollectiongoodsaddressBean = GodfreightmgrService.initCreateCollectionGoodsAddressBean(mchId_channl);
			int addressId = GodfreightmgrService.createcollectiongoodsaddressCall(createcollectiongoodsaddressBean);
			
			editcollectiongoodsaddressBean.setAddressId(addressId);
			editcollectiongoodsaddressBean.setAddressName("editname");
//			editcollectiongoodsaddressBean.setSellerId(mchId_channl);
			editcollectiongoodsaddressBean.setAddressPic("http://www.yamtou.com");
			editcollectiongoodsaddressBean.setAddressType(2);
			editcollectiongoodsaddressBean.setAreaCode("86");
			editcollectiongoodsaddressBean.setBaseAddress("baseAddress");
			editcollectiongoodsaddressBean.setDetailAddress("detailAddress");
			editcollectiongoodsaddressBean.setMobile(TestDataManager.getPhoneNum());
			editcollectiongoodsaddressCall.setData(editcollectiongoodsaddressBean);
			editcollectiongoodsaddressCall.callService();			
			Logger.verifyEquals("400", editcollectiongoodsaddressCall.getString("code"), "验证code");
			
		} catch (Exception e) {
			Logger.fail(e);
		}
	}
	@Test
	@Category({P2.class})
	@TestCase
	public void Tc_EditCollectionGoodsAddress_003() {
		Logger.start(true,"不输入addressName不修改");
		try {
			Integer mchId_channl = GodmchManageCallService.CreateSellerMch();
			CreateCollectionGoodsAddressBean createcollectiongoodsaddressBean = GodfreightmgrService.initCreateCollectionGoodsAddressBean(mchId_channl);
			int addressId = GodfreightmgrService.createcollectiongoodsaddressCall(createcollectiongoodsaddressBean);
			
			editcollectiongoodsaddressBean.setAddressId(addressId);
//			editcollectiongoodsaddressBean.setAddressName("editname");
			editcollectiongoodsaddressBean.setSellerId(mchId_channl);
			editcollectiongoodsaddressBean.setAddressPic("http://www.yamtou.com");
			editcollectiongoodsaddressBean.setAddressType(2);
			editcollectiongoodsaddressBean.setAreaCode("86");
			editcollectiongoodsaddressBean.setBaseAddress("baseAddress");
			editcollectiongoodsaddressBean.setDetailAddress("detailAddress");
			editcollectiongoodsaddressBean.setMobile(TestDataManager.getPhoneNum());
			editcollectiongoodsaddressCall.setData(editcollectiongoodsaddressBean);
			editcollectiongoodsaddressCall.callService();		
			//不输入的时候异常处理
			Logger.verifyEquals("400", editcollectiongoodsaddressCall.getString("code"), "验证code");
			
		} catch (Exception e) {
			Logger.fail(e);
		}
	}
	@Test
	@Category({P2.class})
	@TestCase
	public void Tc_EditCollectionGoodsAddress_004() {
		Logger.start(true,"不输入addressPic不修改");
		try {
			Integer mchId_channl = GodmchManageCallService.CreateSellerMch();
			CreateCollectionGoodsAddressBean createcollectiongoodsaddressBean = GodfreightmgrService.initCreateCollectionGoodsAddressBean(mchId_channl);
			int addressId = GodfreightmgrService.createcollectiongoodsaddressCall(createcollectiongoodsaddressBean);
			
			editcollectiongoodsaddressBean.setAddressId(addressId);
			editcollectiongoodsaddressBean.setAddressName("editname");
			editcollectiongoodsaddressBean.setSellerId(mchId_channl);
//			editcollectiongoodsaddressBean.setAddressPic("http://www.yamtou.com");
			editcollectiongoodsaddressBean.setAddressType(2);
			editcollectiongoodsaddressBean.setAreaCode("86");
			editcollectiongoodsaddressBean.setBaseAddress("baseAddress");
			editcollectiongoodsaddressBean.setDetailAddress("detailAddress");
			editcollectiongoodsaddressBean.setMobile(TestDataManager.getPhoneNum());
			editcollectiongoodsaddressCall.setData(editcollectiongoodsaddressBean);
			editcollectiongoodsaddressCall.callService();			
			Logger.verifyEquals("200", editcollectiongoodsaddressCall.getString("code"), "验证code");
			verify(addressId,editcollectiongoodsaddressBean);
			
		} catch (Exception e) {
			Logger.fail(e);
		}
	}
	@Test
	@Category({P2.class})
	@TestCase
	public void Tc_EditCollectionGoodsAddress_005() {
		Logger.start(true,"不输入addressType失败");
		try {
			Integer mchId_channl = GodmchManageCallService.CreateSellerMch();
			CreateCollectionGoodsAddressBean createcollectiongoodsaddressBean = GodfreightmgrService.initCreateCollectionGoodsAddressBean(mchId_channl);
			int addressId = GodfreightmgrService.createcollectiongoodsaddressCall(createcollectiongoodsaddressBean);
			
			editcollectiongoodsaddressBean.setAddressId(addressId);
			editcollectiongoodsaddressBean.setAddressName("editname");
			editcollectiongoodsaddressBean.setSellerId(mchId_channl);
			editcollectiongoodsaddressBean.setAddressPic("http://www.yamtou.com");
//			editcollectiongoodsaddressBean.setAddressType(2);
			editcollectiongoodsaddressBean.setAreaCode("86");
			editcollectiongoodsaddressBean.setBaseAddress("baseAddress");
			editcollectiongoodsaddressBean.setDetailAddress("detailAddress");
			editcollectiongoodsaddressBean.setMobile(TestDataManager.getPhoneNum());
			editcollectiongoodsaddressCall.setData(editcollectiongoodsaddressBean);
			editcollectiongoodsaddressCall.callService();			
			Logger.verifyEquals("400", editcollectiongoodsaddressCall.getString("code"), "验证code");
			
		} catch (Exception e) {
			Logger.fail(e);
		}
	}
	@Test
	@Category({P2.class})
	@TestCase
	public void Tc_EditCollectionGoodsAddress_006() {
		Logger.start(true,"不输baseAddress不修改");
		try {
			Integer mchId_channl = GodmchManageCallService.CreateSellerMch();
			CreateCollectionGoodsAddressBean createcollectiongoodsaddressBean = GodfreightmgrService.initCreateCollectionGoodsAddressBean(mchId_channl);
			int addressId = GodfreightmgrService.createcollectiongoodsaddressCall(createcollectiongoodsaddressBean);
			
			editcollectiongoodsaddressBean.setAddressId(addressId);
			editcollectiongoodsaddressBean.setAddressName("editname");
			editcollectiongoodsaddressBean.setSellerId(mchId_channl);
			editcollectiongoodsaddressBean.setAddressPic("http://www.yamtou.com");
			editcollectiongoodsaddressBean.setAddressType(2);
			editcollectiongoodsaddressBean.setAreaCode("86");
//			editcollectiongoodsaddressBean.setBaseAddress("baseAddress");
			editcollectiongoodsaddressBean.setDetailAddress("detailAddress");
			editcollectiongoodsaddressBean.setMobile(TestDataManager.getPhoneNum());
			editcollectiongoodsaddressCall.setData(editcollectiongoodsaddressBean);
			editcollectiongoodsaddressCall.callService();			
			Logger.verifyEquals("200", editcollectiongoodsaddressCall.getString("code"), "验证code");
			verify(addressId,editcollectiongoodsaddressBean);
			
		} catch (Exception e) {
			Logger.fail(e);
		}
	}
	@Test
	@Category({P2.class})
	@TestCase
	public void Tc_EditCollectionGoodsAddress_007() {
		Logger.start(true,"不输入detailAddress不修改");
		try {
			Integer mchId_channl = GodmchManageCallService.CreateSellerMch();
			CreateCollectionGoodsAddressBean createcollectiongoodsaddressBean = GodfreightmgrService.initCreateCollectionGoodsAddressBean(mchId_channl);
			int addressId = GodfreightmgrService.createcollectiongoodsaddressCall(createcollectiongoodsaddressBean);
			
			editcollectiongoodsaddressBean.setAddressId(addressId);
			editcollectiongoodsaddressBean.setAddressName("editname");
			editcollectiongoodsaddressBean.setSellerId(mchId_channl);
			editcollectiongoodsaddressBean.setAddressPic("http://www.yamtou.com");
			editcollectiongoodsaddressBean.setAddressType(2);
			editcollectiongoodsaddressBean.setAreaCode("86");
			editcollectiongoodsaddressBean.setBaseAddress("baseAddress");
//			editcollectiongoodsaddressBean.setDetailAddress("detailAddress");
			editcollectiongoodsaddressBean.setMobile(TestDataManager.getPhoneNum());
			editcollectiongoodsaddressCall.setData(editcollectiongoodsaddressBean);
			editcollectiongoodsaddressCall.callService();			
			Logger.verifyEquals("200", editcollectiongoodsaddressCall.getString("code"), "验证code");
			verify(addressId,editcollectiongoodsaddressBean);
			
		} catch (Exception e) {
			Logger.fail(e);
		}
	}
	@Test
	@Category({P2.class})
	@TestCase
	public void Tc_EditCollectionGoodsAddress_008() {
		Logger.start(true,"不输入areaCode失败");
		try {
			Integer mchId_channl = GodmchManageCallService.CreateSellerMch();
			CreateCollectionGoodsAddressBean createcollectiongoodsaddressBean = GodfreightmgrService.initCreateCollectionGoodsAddressBean(mchId_channl);
			int addressId = GodfreightmgrService.createcollectiongoodsaddressCall(createcollectiongoodsaddressBean);
			
			editcollectiongoodsaddressBean.setAddressId(addressId);
			editcollectiongoodsaddressBean.setAddressName("editname");
			editcollectiongoodsaddressBean.setSellerId(mchId_channl);
			editcollectiongoodsaddressBean.setAddressPic("http://www.yamtou.com");
			editcollectiongoodsaddressBean.setAddressType(2);
//			editcollectiongoodsaddressBean.setAreaCode("86");
			editcollectiongoodsaddressBean.setBaseAddress("baseAddress");
			editcollectiongoodsaddressBean.setDetailAddress("detailAddress");
			editcollectiongoodsaddressBean.setMobile(TestDataManager.getPhoneNum());
			editcollectiongoodsaddressCall.setData(editcollectiongoodsaddressBean);
			editcollectiongoodsaddressCall.callService();			
			Logger.verifyEquals("400", editcollectiongoodsaddressCall.getString("code"), "验证code");
			
		} catch (Exception e) {
			Logger.fail(e);
		}
	}
	@Test
	@Category({P2.class})
	@TestCase
	public void Tc_EditCollectionGoodsAddress_009() {
		Logger.start(true,"不输入mobile失败");
		try {
			Integer mchId_channl = GodmchManageCallService.CreateSellerMch();
			CreateCollectionGoodsAddressBean createcollectiongoodsaddressBean = GodfreightmgrService.initCreateCollectionGoodsAddressBean(mchId_channl);
			int addressId = GodfreightmgrService.createcollectiongoodsaddressCall(createcollectiongoodsaddressBean);
			
			editcollectiongoodsaddressBean.setAddressId(addressId);
			editcollectiongoodsaddressBean.setAddressName("editname");
			editcollectiongoodsaddressBean.setSellerId(mchId_channl);
			editcollectiongoodsaddressBean.setAddressPic("http://www.yamtou.com");
			editcollectiongoodsaddressBean.setAddressType(2);
			editcollectiongoodsaddressBean.setAreaCode("86");
			editcollectiongoodsaddressBean.setBaseAddress("baseAddress");
			editcollectiongoodsaddressBean.setDetailAddress("detailAddress");
//			editcollectiongoodsaddressBean.setMobile(TestDataManager.getPhoneNum());
			editcollectiongoodsaddressCall.setData(editcollectiongoodsaddressBean);
			editcollectiongoodsaddressCall.callService();			
			Logger.verifyEquals("400", editcollectiongoodsaddressCall.getString("code"), "验证code");
			
		} catch (Exception e) {
			Logger.fail(e);
		}
	}
	@Test
	@Category({P2.class})
	@TestCase
	public void Tc_EditCollectionGoodsAddress_010() {
		Logger.start(true,"输入addressName超长失败");
		try {
			Integer mchId_channl = GodmchManageCallService.CreateSellerMch();
			CreateCollectionGoodsAddressBean createcollectiongoodsaddressBean = GodfreightmgrService.initCreateCollectionGoodsAddressBean(mchId_channl);
			int addressId = GodfreightmgrService.createcollectiongoodsaddressCall(createcollectiongoodsaddressBean);
			String name="";
			for (int i = 0; i < 50; i++) {
				name+="自提点AutoTest";
			}
			editcollectiongoodsaddressBean.setAddressId(addressId);
			editcollectiongoodsaddressBean.setAddressName(name);
			editcollectiongoodsaddressBean.setSellerId(mchId_channl);
			editcollectiongoodsaddressBean.setAddressPic("http://www.yamtou.com");
			editcollectiongoodsaddressBean.setAddressType(2);
			editcollectiongoodsaddressBean.setAreaCode("86");
			editcollectiongoodsaddressBean.setBaseAddress("baseAddress");
			editcollectiongoodsaddressBean.setDetailAddress("detailAddress");
			editcollectiongoodsaddressBean.setMobile(TestDataManager.getPhoneNum());
			editcollectiongoodsaddressCall.setData(editcollectiongoodsaddressBean);
			editcollectiongoodsaddressCall.callService();			
			Logger.verifyEquals("400", editcollectiongoodsaddressCall.getString("code"), "验证code");
			
		} catch (Exception e) {
			Logger.fail(e);
		}
	}
	@Test
	@Category({P2.class})
	@TestCase
	public void Tc_EditCollectionGoodsAddress_011() {
		Logger.start(true,"输入detailAddress超长失败");
		try {
			Integer mchId_channl = GodmchManageCallService.CreateSellerMch();
			CreateCollectionGoodsAddressBean createcollectiongoodsaddressBean = GodfreightmgrService.initCreateCollectionGoodsAddressBean(mchId_channl);
			int addressId = GodfreightmgrService.createcollectiongoodsaddressCall(createcollectiongoodsaddressBean);
			String name="";
			for (int i = 0; i < 50; i++) {
				name+="自提点AutoTest";
			}
			editcollectiongoodsaddressBean.setAddressId(addressId);
			editcollectiongoodsaddressBean.setAddressName("name");
			editcollectiongoodsaddressBean.setSellerId(mchId_channl);
			editcollectiongoodsaddressBean.setAddressPic("http://www.yamtou.com");
			editcollectiongoodsaddressBean.setAddressType(2);
			editcollectiongoodsaddressBean.setAreaCode("86");
			editcollectiongoodsaddressBean.setBaseAddress("baseAddress");
			editcollectiongoodsaddressBean.setDetailAddress(name);
			editcollectiongoodsaddressBean.setMobile(TestDataManager.getPhoneNum());
			editcollectiongoodsaddressCall.setData(editcollectiongoodsaddressBean);
			editcollectiongoodsaddressCall.callService();			
			Logger.verifyEquals("500", editcollectiongoodsaddressCall.getString("code"), "验证code");
			
		} catch (Exception e) {
			Logger.fail(e);
		}
	}
	@Test
	@Category({P2.class})
	@TestCase
	public void Tc_EditCollectionGoodsAddress_012() {
		Logger.start(true,"输入错误的addressType失败");
		try {
			Integer mchId_channl = GodmchManageCallService.CreateSellerMch();
			CreateCollectionGoodsAddressBean createcollectiongoodsaddressBean = GodfreightmgrService.initCreateCollectionGoodsAddressBean(mchId_channl);
			int addressId = GodfreightmgrService.createcollectiongoodsaddressCall(createcollectiongoodsaddressBean);
			
			editcollectiongoodsaddressBean.setAddressId(addressId);
			editcollectiongoodsaddressBean.setAddressName("editname");
			editcollectiongoodsaddressBean.setSellerId(mchId_channl);
			editcollectiongoodsaddressBean.setAddressPic("http://www.yamtou.com");
			editcollectiongoodsaddressBean.setAddressType(0);
			editcollectiongoodsaddressBean.setAreaCode("86");
			editcollectiongoodsaddressBean.setBaseAddress("baseAddress");
			editcollectiongoodsaddressBean.setDetailAddress("detailAddress");
			editcollectiongoodsaddressBean.setMobile(TestDataManager.getPhoneNum());
			editcollectiongoodsaddressCall.setData(editcollectiongoodsaddressBean);
			editcollectiongoodsaddressCall.callService();			
			Logger.verifyEquals("400", editcollectiongoodsaddressCall.getString("code"), "验证code");
			
		} catch (Exception e) {
			Logger.fail(e);
		}
	}
	@Test
	@Category({P2.class})
	@TestCase
	public void Tc_EditCollectionGoodsAddress_013() {
		Logger.start(true,"不输入addressid失败");
		try {
			Integer mchId_channl = GodmchManageCallService.CreateSellerMch();
			CreateCollectionGoodsAddressBean createcollectiongoodsaddressBean = GodfreightmgrService.initCreateCollectionGoodsAddressBean(mchId_channl);
			int addressId = GodfreightmgrService.createcollectiongoodsaddressCall(createcollectiongoodsaddressBean);
			
//			editcollectiongoodsaddressBean.setAddressId(addressId);
			editcollectiongoodsaddressBean.setAddressName("editname");
			editcollectiongoodsaddressBean.setSellerId(mchId_channl);
			editcollectiongoodsaddressBean.setAddressPic("http://www.yamtou.com");
			editcollectiongoodsaddressBean.setAddressType(2);
			editcollectiongoodsaddressBean.setAreaCode("86");
			editcollectiongoodsaddressBean.setBaseAddress("baseAddress");
			editcollectiongoodsaddressBean.setDetailAddress("detailAddress");
			editcollectiongoodsaddressBean.setMobile(TestDataManager.getPhoneNum());
			editcollectiongoodsaddressCall.setData(editcollectiongoodsaddressBean);
			editcollectiongoodsaddressCall.callService();			
			Logger.verifyEquals("400", editcollectiongoodsaddressCall.getString("code"), "验证code");
			
		} catch (Exception e) {
			Logger.fail(e);
		}
	}
	@Test
	@Category({P2.class})
	@TestCase
	public void Tc_EditCollectionGoodsAddress_014() {
		Logger.start(true,"输入addressid和sellerid不匹配失败");
		try {
			Integer mchId_channl = GodmchManageCallService.CreateSellerMch();
			CreateCollectionGoodsAddressBean createcollectiongoodsaddressBean = GodfreightmgrService.initCreateCollectionGoodsAddressBean(mchId_channl);
			int addressId = GodfreightmgrService.createcollectiongoodsaddressCall(createcollectiongoodsaddressBean);
			
			editcollectiongoodsaddressBean.setAddressId(addressId-1);
			editcollectiongoodsaddressBean.setAddressName("editname");
			editcollectiongoodsaddressBean.setSellerId(mchId_channl);
			editcollectiongoodsaddressBean.setAddressPic("http://www.yamtou.com");
			editcollectiongoodsaddressBean.setAddressType(2);
			editcollectiongoodsaddressBean.setAreaCode("86");
			editcollectiongoodsaddressBean.setBaseAddress("baseAddress");
			editcollectiongoodsaddressBean.setDetailAddress("detailAddress");
			editcollectiongoodsaddressBean.setMobile(TestDataManager.getPhoneNum());
			editcollectiongoodsaddressCall.setData(editcollectiongoodsaddressBean);
			editcollectiongoodsaddressCall.callService();			
			Logger.verifyEquals("400", editcollectiongoodsaddressCall.getString("code"), "验证code");
			
		} catch (Exception e) {
			Logger.fail(e);
		}
	}
	@Test
	@Category({P1.class})
	@TestCase
	public void Tc_EditCollectionGoodsAddress_015() {
		Logger.start(true,"修改自提点-自提点唯一");
		try {
			Integer mchId_channl = GodmchManageCallService.CreateSellerMch();
			CreateCollectionGoodsAddressBean createcollectiongoodsaddressBean = GodfreightmgrService.initCreateCollectionGoodsAddressBean(mchId_channl);
			int addressId = GodfreightmgrService.createcollectiongoodsaddressCall(createcollectiongoodsaddressBean);
			CreateCollectionGoodsAddressBean createcollectiongoodsaddressBean2 = GodfreightmgrService.initCreateCollectionGoodsAddressBean(mchId_channl);
			createcollectiongoodsaddressBean2.setAddressName("editname");
			int addressId2 = GodfreightmgrService.createcollectiongoodsaddressCall(createcollectiongoodsaddressBean2);
			
			editcollectiongoodsaddressBean.setAddressId(addressId);
			editcollectiongoodsaddressBean.setAddressName("editname");
			editcollectiongoodsaddressBean.setSellerId(mchId_channl);
			editcollectiongoodsaddressBean.setAddressPic("http://www.yamtou.com");
			editcollectiongoodsaddressBean.setAddressType(2);
			editcollectiongoodsaddressBean.setAreaCode("86");
			editcollectiongoodsaddressBean.setBaseAddress("baseAddress");
			editcollectiongoodsaddressBean.setDetailAddress("detailAddress");
			editcollectiongoodsaddressBean.setMobile(TestDataManager.getPhoneNum());
			editcollectiongoodsaddressCall.setData(editcollectiongoodsaddressBean);
			editcollectiongoodsaddressCall.callService();			
			Logger.verifyEquals("400", editcollectiongoodsaddressCall.getString("code"), "验证code");
		} catch (Exception e) {
			Logger.fail(e);
		}
	}
	@Test
	@Category({P1.class})
	@TestCase
	public void Tc_EditCollectionGoodsAddress_016() {
		Logger.start(true,"修改自提点成功-AddressName不变");
		try {
			Integer mchId_channl = GodmchManageCallService.CreateSellerMch();
			CreateCollectionGoodsAddressBean createcollectiongoodsaddressBean = GodfreightmgrService.initCreateCollectionGoodsAddressBean(mchId_channl);
			int addressId = GodfreightmgrService.createcollectiongoodsaddressCall(createcollectiongoodsaddressBean);
			
			editcollectiongoodsaddressBean.setAddressId(addressId);
			editcollectiongoodsaddressBean.setAddressName(createcollectiongoodsaddressBean.getAddressName());
			editcollectiongoodsaddressBean.setSellerId(mchId_channl);
			editcollectiongoodsaddressBean.setAddressPic("http://www.yamtou.com");
			editcollectiongoodsaddressBean.setAddressType(2);
			editcollectiongoodsaddressBean.setAreaCode("86");
			editcollectiongoodsaddressBean.setBaseAddress("baseAddress");
			editcollectiongoodsaddressBean.setDetailAddress("detailAddress");
			editcollectiongoodsaddressBean.setMobile(TestDataManager.getPhoneNum());
			editcollectiongoodsaddressCall.setData(editcollectiongoodsaddressBean);
			editcollectiongoodsaddressCall.callService();			
			Logger.verifyEquals("200", editcollectiongoodsaddressCall.getString("code"), "验证code");
			verify(addressId,editcollectiongoodsaddressBean);
		} catch (Exception e) {
			Logger.fail(e);
		}
	}
	@Test
	@Category({P1.class})
	@TestCase
	public void Tc_EditCollectionGoodsAddress_017() {
		Logger.start(true,"修改自提点失败-AddressName和已存在的其他名字重发");
		try {
			Integer mchId_channl = GodmchManageCallService.CreateSellerMch();
			CreateCollectionGoodsAddressBean createcollectiongoodsaddressBean = GodfreightmgrService.initCreateCollectionGoodsAddressBean(mchId_channl);
			int addressId = GodfreightmgrService.createcollectiongoodsaddressCall(createcollectiongoodsaddressBean);
			CreateCollectionGoodsAddressBean createcollectiongoodsaddressBean2 = GodfreightmgrService.initCreateCollectionGoodsAddressBean(mchId_channl);
			int addressId2 = GodfreightmgrService.createcollectiongoodsaddressCall(createcollectiongoodsaddressBean2);
			editcollectiongoodsaddressBean.setAddressId(addressId);
			editcollectiongoodsaddressBean.setAddressName(createcollectiongoodsaddressBean2.getAddressName());
			editcollectiongoodsaddressBean.setSellerId(mchId_channl);
			editcollectiongoodsaddressBean.setAddressPic("http://www.yamtou.com");
			editcollectiongoodsaddressBean.setAddressType(2);
			editcollectiongoodsaddressBean.setAreaCode("86");
			editcollectiongoodsaddressBean.setBaseAddress("baseAddress");
			editcollectiongoodsaddressBean.setDetailAddress("detailAddress");
			editcollectiongoodsaddressBean.setMobile(TestDataManager.getPhoneNum());
			editcollectiongoodsaddressCall.setData(editcollectiongoodsaddressBean);
			editcollectiongoodsaddressCall.callService();			
			Logger.verifyEquals("400", editcollectiongoodsaddressCall.getString("code"), "验证code");
		} catch (Exception e) {
			Logger.fail(e);
		}
	}
}